package com.java.program_questions;

import java.util.Arrays;
import java.util.Scanner;

/**
 * 问题：输入3个数a,b,c，按大小顺序输出
 * 分析：利用指针方法
 */
public class Question34 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print("输入三个待排序的数：");
        int[] a = new int[3];
        for (int i = 0; i < 3; i++) {
            a[i] = sc.nextInt();
        }

        Arrays.sort(a);
        
        for (int i = 0; i < 3; i++) {
            System.out.print(a[i] + " ");
        }
    }
}
